﻿using System.ComponentModel;
using System.Xml;
using System.Xml.Serialization;

namespace Bpmn.Xml;

/// <remarks/>
[XmlInclude(typeof(SubChoreography))]
[XmlInclude(typeof(ChoreographyTask))]
[XmlInclude(typeof(CallChoreography))]
[Serializable]
[XmlType(Namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL", TypeName = "tChoreographyActivity")]
[XmlRoot("choreographyActivity", Namespace = "http://www.omg.org/spec/BPMN/20100524/MODEL", IsNullable = false)]
public abstract partial class ChoreographyActivity : FlowNode
{
    /// <remarks/>
    [XmlElement("participantRef")]
    public XmlQualifiedName[] ParticipantRef { get; set; } = default!;

    /// <remarks/>
    [XmlElement("correlationKey")]
    public CorrelationKey[] CorrelationKey { get; set; } = default!;

    /// <remarks/>
    [XmlAttribute("initiatingParticipantRef")]
    public XmlQualifiedName InitiatingParticipantRef { get; set; } = default!;

    /// <remarks/>
    [XmlAttribute("loopType")]
    [DefaultValue(ChoreographyLoopType.None)]
    public ChoreographyLoopType LoopType { get; set; } = ChoreographyLoopType.None;
}
